myApp.controller("AccountController",["$scope","AccountService","$http","$attrs","$location",function($scope,AccountService,$http,$attrs,$location){
     console.log("mm");
	console.log($location.path());
	$scope.ListItem=AccountService.ListItem;
	$scope.show_status=false;

	$scope.change=function(){
	$scope.ListItem=AccountService.change();
	console.log("mmm");
	}

	//添加
	$scope.add=function(){
		//console.log($scope.user);
		var nn=angular.copy($scope.user);
		//var nn=$scope.user;
		$scope.ListItem.push(nn);
	};
	//显示遮罩层
	$scope.showMask=function(){
		//console.log($scope.url);
		$scope.show_status=true;
	}
	
	$scope.getInfo=function(){
		$http.get("http://127.0.0.1/angular_tp/index.php/Account/test").success(function(data){
			console.log(data);
		});
	}
	
	//console.log($attrs.url);
	//请求数据
	//console.log("http://127.0.0.1/angular_tp/index.php/Account/getlist");
	// var promise=$http.get("http://127.0.0.1/angular_tp/index.php/Account/getlist");
	// 	promise.then(function(data){
	// 		//console.log(data);
	// 		$scope.ListItem0=data.data;
	// 	})

}])
